home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2001 April / april_2001.iso / intercd / root / ^Palm / Games / eCross / src / Bounded.java < prev    next >
Encoding:
Java Source  |  2000-07-25  |  1.4 KB  |  51 lines

  1. /*
  2.  * Bounded.java - Defines a 'bounded' object
  3.  * Copyright (C) 2000 Romain Guy
  4.  * guy.romain@bigfoot.com
  5.  * www.jext.org
  6.  *
  7.  * This program is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU General Public License
  9.  * as published by the Free Software Foundation; either version 2
  10.  * of the License, or any later version.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; if not, write to the Free Software
  19.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  */
  21.  
  22. /**
  23.  * <code>Bounded</code> defines the method <code>setRect()</code>
  24.  * for objects which need it. It avoids to extends <code>Control</code>
  25.  * adn thus it saves memory.
  26.  * @author Romain Guy <guy.romain@bigfoot.com>
  27.  * @version 1.0
  28.  */
  29.  
  30. public class Bounded
  31. {
  32.   // simulates a control behavior
  33.   protected int x, y, width, height;
  34.  
  35.   public Bounded() { }
  36.  
  37.   /**
  38.    * See <code>waba.ui.Control</code> API documentation.
  39.    */
  40.  
  41.   public void setRect(int x, int y, int width, int height)
  42.   {
  43.     this.x = x;
  44.     this.y = y;
  45.     this.width = width;
  46.     this.height = height;
  47.   }
  48. }
  49.  
  50. // End of Bounded.java
  51.